package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * OrganFriendListId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class OrganFriendListId implements java.io.Serializable {

	// Fields

	private Integer organFriendId;
	private Integer uid;
	private Integer corpId;

	// Constructors

	/** default constructor */
	public OrganFriendListId() {
	}

	/** full constructor */
	public OrganFriendListId(Integer organFriendId, Integer uid, Integer corpId) {
		this.organFriendId = organFriendId;
		this.uid = uid;
		this.corpId = corpId;
	}

	// Property accessors

	@Column(name = "organ_friend_id", nullable = false)
	public Integer getOrganFriendId() {
		return this.organFriendId;
	}

	public void setOrganFriendId(Integer organFriendId) {
		this.organFriendId = organFriendId;
	}

	@Column(name = "uid", nullable = false)
	public Integer getUid() {
		return this.uid;
	}

	public void setUid(Integer uid) {
		this.uid = uid;
	}

	@Column(name = "corp_id", nullable = false)
	public Integer getCorpId() {
		return this.corpId;
	}

	public void setCorpId(Integer corpId) {
		this.corpId = corpId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof OrganFriendListId))
			return false;
		OrganFriendListId castOther = (OrganFriendListId) other;

		return ((this.getOrganFriendId() == castOther.getOrganFriendId()) || (this
				.getOrganFriendId() != null
				&& castOther.getOrganFriendId() != null && this
				.getOrganFriendId().equals(castOther.getOrganFriendId())))
				&& ((this.getUid() == castOther.getUid()) || (this.getUid() != null
						&& castOther.getUid() != null && this.getUid().equals(
						castOther.getUid())))
				&& ((this.getCorpId() == castOther.getCorpId()) || (this
						.getCorpId() != null && castOther.getCorpId() != null && this
						.getCorpId().equals(castOther.getCorpId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getOrganFriendId() == null ? 0 : this.getOrganFriendId()
						.hashCode());
		result = 37 * result
				+ (getUid() == null ? 0 : this.getUid().hashCode());
		result = 37 * result
				+ (getCorpId() == null ? 0 : this.getCorpId().hashCode());
		return result;
	}

}